\documentclass[twocolumn, a4paper]{article}
\usepackage{geometry}
\usepackage{xeCJK}
\geometry{margin=1.5cm, vmargin={0pt,1cm}}
\setlength{\topmargin}{-1cm}
\setlength{\paperheight}{29.7cm}
\setlength{\textheight}{25.3cm}

% useful packages.
\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{enumerate}
\usepackage{graphicx}
\usepackage{multicol}
\usepackage{fancyhdr}
\usepackage{layout}
% draw packages
\usepackage{tikz}
\usepackage{forest}
%用于实现在同一页中实现不同的分栏
\usepackage{multicol} 

\def\b{\boldsymbol{}}
\def\v{\vert}
\def\V{\Vert}


\begin{document}
	
	\pagestyle{fancy}
	\fancyhead{}
	\lhead{Haolong Li(3180105433)}
	\chead{FEM Report \# 01}
	\rhead{\today}
	
\section*{Miscellaneous}
This report is divided into three parts, which are consist of PART I: Error and numercial results, PART II: The code's note and personal change, PART III: Operation intruction. The code language is C++, the mesh generation software is Easymesh, and the softwares that draw numercial result pictures are OpenDX and Matlab.

\section*{PART I. Error and numercial results.}
In this report, we compute the $L^{2}$ norm with related mesh generation triangle's length of side to show the order of error. In the picture below, x label is $\log(h_{i})$ with $h=[0.5,0.25,0.125,0.0625,0.3125,0.15625]$, y label is $log(\V L^{2}\V)$, and we use one-degree function to fit the result, the gradient of the one-degree function is the convergence of the order of error.

Here just use two method, P1 and P2.

P1possion fem:
 
\includegraphics[scale=0.3]{P1R.jpg}

From the math analysis for P1 fem, we know the the order of error is $h(O^{2})$, the gradient of the line is 2.001, so it fits well.

P2possion fem:

\includegraphics[scale=0.3]{P2R.jpg}

From the math analysis for P2 fem, we know the the order of error is $h(O^{3})$, the gradient of the line is 2.942, so it fits well.


All the mesh generation pictures and related data are in data filedir. The format is .rgb, and these pictures can be opened by OpenDX.
\section*{PART II. The code's note and personal change.}
I have read all the codes and give some my personal note to my fem2021's code. In addition, I fixed some bug in regularpossion.cpp and rewrite possion.cpp and possionP2.cpp into a ugly factory pattern with a main.cpp to run them. The main.cpp will read the method in Inputfile.txt to run the related method(P1 and P2). Also, I write a makefile to simplify the compile command.

Geometry(An abstract class for element, such as triangle and square.) $\rightarrow$ Point(Point data struct to storage the point and vertex information) $\rightarrow$ element(The element in fem) $\rightarrow$ mesh(The mesh in fem) $\rightarrow$ femsolver(A product class with P1 and P2 possion fem) $\rightarrow$ femFactory(A factory class to product P1 and P2 possion solver) $\rightarrow$ main(The main cpp)


\section*{PART III. Operation intruction.}
\subsection*{III-a. Make command}
Command "make" will compile the main.cpp.

Command "make run" will compile and run the main.exe

Command "make report" will compile the report.tex

Command "make clean" will clean all the file created above.
\subsection*{III-b. Inputfile}
Inputfile.txt has just one line with "P1" or "P2". Otherwise it will report error.
\end{document}

%%% Local Variables: 
%%% mode: latex
%%% TeX-master: t
%%% End: 
